#editor(ng-controller = "EditorCtrl", ng-mousedown="focusEditor($event)", ng-class="{'file-loaded': settings.filemode && editor.document.id, 'maximize-editor': editor.maximized}")
  .file-bar.slide-down(ng-if="settings.filemode && editor.document.id")
    .title
      {{editor.document.content | autotitle}}
      //- a.btn.btn-success.btn-xs.btn-save(ng-if='editor.hasChanged()', ng-click='star()') Save
      //- a.btn.btn-default.btn-xs.btn-save(ng-if='editor.hasChanged()', ng-click='star()') Revert
    ul.file-actions.list-inline.pull-left
      li(ng-class="{'modified': editor.hasChanged()}")
        a.fa.fa-star(ng-click='star()') Save
      li
        a.fa.fa-plus(ng-click='create()') New
      li
        a.fa.fa-code-fork(ng-click='clone()') Clone
      li
        a.fa.fa-download(exportable ng-click='exportScript(editor.content)', tooltip="Export to file") Download
    ul.file-actions.list-inline.pull-right
      li
        a.button.fa.fa-play('ng-click' = 'editor.execScript(editor.content)')
      li
        a.button.fa.fa-times(ng-click='editor.setContent("")')
  .view-editor
    span(ng-class="{'one-line': editorOneLine, 'disable-highlighting': disableHighlighting}")
      .prompt.code-style $
      ui-codemirror('ui-codemirror-opts'="{gutters:['cypher-hints'], theme: 'neo', mode: 'cypher', autofocus: true, lineNumbers: true, lineWrapping: true, onLoad: codemirrorLoaded}",
        ng-model='editor.content',
        placeholder='{{motd.tip}}'
        )
    ul.controls.list-inline(ng-if="!(settings.filemode && editor.document.id)")
      li
        a.circled.favorites.sl.sl-star-circle(ng-class="{'sl-star-filled': !editor.hasChanged() && hoveringStar, 'sl-pencil-circle': editor.hasChanged() && !hoveringStar, 'sl-pencil-filled':editor.hasChanged() && hoveringStar, active: editorHasContent, 'enabled': editor.document.id, 'changed': editor.hasChanged()}",
          ng-mouseenter="hoveringStar=true",
          ng-mouseleave="hoveringStar=false",
          ng-click='star()',
          tooltip='Favorite',
          tooltip-placement='left')
      li(ng-if="!settings.filemode")
        a.circled.delete.sl.sl-delete-circle(ng-click='editor.setContent("")',
          ng-class="{active: editorHasContent, 'sl-delete-filled': hoveringDelete}",
          ng-mouseenter="hoveringDelete=true",
          ng-mouseleave="hoveringDelete=false",
          tooltip='Clear',
          tooltip-placement='left')
      li
        a.circled.play.sl.sl-play(ng-click = 'editor.execScript(editor.content)',
          ng-mouseenter='hoveringPlay=true',
          ng-mouseleave='hoveringPlay=false',
          ng-class="{active: editorHasContent, 'sl-play-filled': hoveringPlay}",
          tooltip='Play',
          tooltip-placement='left')

    .message-bar.error.slide-down(ng-if='editor.showMessage', ng-class="editor.errorCode")
      span(ng-bind-html-unsafe="editor.errorMessage")
      |  Type <code click-to-code="':help commands'">:help commands</code> for a list of available commands.
      .actions
        a.fa.fa-times-circle(ng-click='editor.showMessage = null')
    .message-bar.info(ng-if='unauthorized && !bolt_connection_failure', ng-class="editor.errorCode")
      span
        | Database access not available. Please use <code click-to-code="':server connect'">:server connect</code>
        | to establish connection. There's a graph waiting for you.
    .message-bar.error.slide-down(ng-if='bolt_connection_failure', ng-class="editor.errorCode")
      span
        | Can not connect to Neo4j. Please check your Network Connection
        a(ng-click="toggleDrawer('preferences')") &nbsp;
          code settings
        |.

